#include "widget.h"
#include "ui_widget.h"
#include "framelesshelper.h"

Widget::Widget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Widget)
{
    ui->setupUi(this);
    FramelessHelper *pHelper = new FramelessHelper(this);
    setWindowFlags(Qt::FramelessWindowHint);
    pHelper->activateOn(this);  //激活当前窗体
    //pHelper->setTitleHeight(m_pTitleBar->height());  //设置窗体的标题栏高度
    pHelper->setWidgetMovable(true);  //设置窗体可移动
    pHelper->setWidgetResizable(true);  //设置窗体可缩放
    pHelper->setRubberBandOnMove(true);  //设置橡皮筋效果-可移动
    pHelper->setRubberBandOnResize(true);  //设置橡皮筋效果-可缩放
}

Widget::~Widget()
{
    delete ui;
}
